<script setup lang="ts">
import b from '~/assets/images/news/banner-bg.jpg'
</script>

<template>
  <div class="news">
    <div class="news-top">
      <div class="banner-container">
        <BannerMedia :url="b"/>
      </div>
      <h1 class="title">新闻动态</h1>
    </div>
    <div class="news-content">
      <div class="news-item" v-for="i in 10">
        <CardInfoItem link="/news/2"/>
      </div>
    </div>
    <div class="page-infos">
      <Pagination :page-size="2" :total="10"/>
    </div>
  </div>
</template>

<style scoped lang="scss">
.news {
  .news-top {
    position: relative;
    width: 24rem;
    height: 8.54rem;
    padding-left: 1.66rem;
    padding-top: 3.78rem;

    .title {
      font-size: 1rem;
      font-weight: bold;
      color: #FFFFFF;
      line-height: 0.6rem;
    }

    .banner-container {
      z-index: -1;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }

  .news-content {
    padding-top: 1.33rem;
    padding-left: 1.78rem;
    //padding-right: 1.71rem;
    display: flex;
    flex-wrap: wrap;

    .news-item {
      margin-right: 0.41rem;
      margin-bottom: 0.6rem;

      &:nth-child(3n) {
        margin-right: 0;
      }
    }
  }
  .page-infos{
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
}
</style>
